package com.sc.nft.controller;

import com.sc.nft.annotation.UserLogin;
import com.sc.nft.feign.WxMiniHomeClient;
import com.sc.nft.req.home.HomePageReq;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.home.HomePageDetailsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/ipMall/wxMiniMall/user/home")
@Api(tags = "用户端小程序主页")
public class WxMiniHomeController {

    private final WxMiniHomeClient wxMiniHomeClient;


    /**
     * 小程序用户端首页
     * @return
     */
    @PostMapping(value = "/get", produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "用户端主页")
    public Result<HomePageDetailsVO> get() {
        return wxMiniHomeClient.homeDetails();
    }

}